@extends('shared.adminBase')
@section('title','操作日志')
@section('content')
    <section class="content-header">
        <h1>操作日志</h1>
        <ol class="breadcrumb">
            <li><a href="{{URL::action('AdminController@innerIndex')}}"><i class="fa fa-home"></i> 首页</a></li>
            <li class="active">操作日志</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->
                <div class="box">
                    <div class="box-header"></div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                            <form id="form1" action="{{URL::action('AdminController@getManagerHandleLog')}}"
                                  method="get">
                                <input type="hidden" name="page" value="{{$pagerSet->currentPage()}}">
                                <div class="row" style="margin-left: 5px;">
                                    <label>用户编号：<input class="form-control" name="id"
                                                       value="{{$form->manager_id}}"></label>
                                    <label>用户名：<input class="form-control" name="username"
                                                      value="{{$form->username}}"></label>
                                    <button type="submit" class="btn btn-primary">查询</button>
                                    <button type="button" onclick="clearForm('form1');" class="btn btn-primary">清空
                                    </button>
                                </div>
                            </form>
                            <br/>
                            <div class="row">
                                <div class="col-sm-12">
                                    <table id="example1" class="table table-bordered table-striped dataTable"
                                           role="grid" aria-describedby="example1_info">
                                        <thead>
                                        <tr role="row">
                                            <th>编号</th>
                                            <th>用户ID</th>
                                            <th>用户名</th>
                                            <th>操作IP</th>
                                            <th>操作资源</th>
                                            <th>级别</th>
                                            <th>描述</th>
                                            <th>操作时间</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        @foreach($pagerSet as $item)
                                            <tr role="row" class="odd">
                                                <td>{{$item->manager_handle_log_id}}</td>
                                                <td>{{$item->manager_id}}</td>
                                                <td>{{$item->username}}</td>
                                                <td>{{$item->handle_ip}}</td>
                                                <td>{{$item->handle_url}}</td>
                                                <td>{{App\Framework\Enum\ManagerHandleLogLevelEnum::getName($item->level)}}</td>
                                                <td>{{$item->description}}</td>
                                                <td>{{$item->handle_time}}</td>
                                            </tr>
                                        @endforeach
                                    </table>
                                </div>
                            </div>
                            <div class="row">
                                @include('shared.tablePaginate')
                            </div>
                            </form>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
@endsection

